Wiki Diff updating oE prompt_string, revision #2 to tip

@[:console:prompt_string|]
==== prompt_string
<eucode>
include console.e
default namespace is console
namespace console
public function prompt_string(sequence prompt)
</eucode>

prompts the user to enter a string of text.

===== Parameters:
# ##prompt## : is a string that will be displayed on the screen.

===== Returns:
A **sequence**,
the string that the user typed in, stripped of any new-line character.

===== Comments:
If the user tries cancelling the prompt by hitting Control+Z, the program will abort, issuing a "Stopped" message.

===== Example 1:
<eucode>
include std/console.e
sequence name = prompt_string("What is your name? ")
</eucode>

===== See Also:
[[:prompt_number]]

Search



Quick Links

User menu

Not signed in.

Misc Menu